<html>
<head><meta charset="utf-8"><title>meeting 06.16.2020 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html">meeting 06.16.2020</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="201066070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066070">(Jun 16 2020 at 19:57)</a>:</h4>
<p>Hi <span class="user-group-mention" data-user-group-id="692">@WG-traits</span>, meeting in 3ish minutes</p>



<a name="201066137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066137">(Jun 16 2020 at 19:58)</a>:</h4>
<p>Link to agenda hackmd: <a href="https://hackmd.io/nrhN5A8sR2eY9UdfJTKcJg">https://hackmd.io/nrhN5A8sR2eY9UdfJTKcJg</a></p>



<a name="201066160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066160">(Jun 16 2020 at 19:58)</a>:</h4>
<p>Link to sprint goals: <a href="https://hackmd.io/D_wskAmRT52zL9xmhmg0Kg">https://hackmd.io/D_wskAmRT52zL9xmhmg0Kg</a></p>



<a name="201066276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066276">(Jun 16 2020 at 19:59)</a>:</h4>
<p>Nothing on the agenda today</p>



<a name="201066360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066360">(Jun 16 2020 at 19:59)</a>:</h4>
<p>But I figure one thing we could talk about is <a href="https://github.com/rust-lang/chalk/pull/526">https://github.com/rust-lang/chalk/pull/526</a>, and the impact of negative cycles</p>



<a name="201066442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066442">(Jun 16 2020 at 20:00)</a>:</h4>
<p>Ok <span class="user-group-mention" data-user-group-id="692">@WG-traits</span> meeting time</p>



<a name="201066479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066479">(Jun 16 2020 at 20:00)</a>:</h4>
<p>Let's start with announcements and updates first?</p>



<a name="201066560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066560">(Jun 16 2020 at 20:00)</a>:</h4>
<p>11 PRs merged in the last week</p>



<a name="201066587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066587">(Jun 16 2020 at 20:01)</a>:</h4>
<p>I've been messing about with the skill-tree repo -- I think I had an mdbook preprocessor working</p>



<a name="201066601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066601">(Jun 16 2020 at 20:01)</a>:</h4>
<p>so that you can do <code>skill-tree...</code> and have it render</p>



<a name="201066631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066631">(Jun 16 2020 at 20:01)</a>:</h4>
<p>I want to try and "upgrade" the skill-tree to be less fine-grained</p>



<a name="201066636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066636">(Jun 16 2020 at 20:01)</a>:</h4>
<p>that's awesome</p>



<a name="201066647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066647">(Jun 16 2020 at 20:01)</a>:</h4>
<p>and more like "each item is a tracking issue"</p>



<a name="201066669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066669">(Jun 16 2020 at 20:01)</a>:</h4>
<p>ideally integrated with the github API so that it queries the issue to find the number of checked boxes</p>



<a name="201066678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066678">(Jun 16 2020 at 20:01)</a>:</h4>
<p>and can show you the overall progress as a percentage :)</p>



<a name="201066679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066679">(Jun 16 2020 at 20:01)</a>:</h4>
<p>I know there was a mention elsewhere that someone liked it and thinks it could be a good idea for rust in general</p>



<a name="201066682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066682">(Jun 16 2020 at 20:02)</a>:</h4>
<p>but that...can wait</p>



<a name="201066742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066742">(Jun 16 2020 at 20:02)</a>:</h4>
<p>this would be closer to the "classic Lin Clark skill tree" I think</p>



<a name="201066763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066763">(Jun 16 2020 at 20:02)</a>:</h4>
<p>anyway, this is what I did in the last 30 minutes because I was too fried to do anything else :)</p>



<a name="201066826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066826">(Jun 16 2020 at 20:03)</a>:</h4>
<p>/me embarassed to admit how long it takes him to get JS to actually run in a web page</p>



<a name="201066851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066851">(Jun 16 2020 at 20:03)</a>:</h4>
<p>I've done some work on generators locally - though I've been holding off for the closures PR, so I don't duplicate work on upvar handling</p>



<a name="201066984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201066984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201066984">(Jun 16 2020 at 20:04)</a>:</h4>
<p><span class="user-mention" data-user-id="125294">@Aaron Hill</span> I think Chalk will actually do very little in terms of upvars</p>



<a name="201067053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067053">(Jun 16 2020 at 20:04)</a>:</h4>
<p>I'll have a PR open soon, then</p>



<a name="201067077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067077">(Jun 16 2020 at 20:05)</a>:</h4>
<p>Closures are getting pretty close</p>



<a name="201067134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067134">(Jun 16 2020 at 20:05)</a>:</h4>
<p>Trying to update the rustc implementation for the lastest changes and tests are failing, so I have to dig into why</p>



<a name="201067273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067273">(Jun 16 2020 at 20:06)</a>:</h4>
<p>Also, we now have Tracing in Chalk :)</p>



<a name="201067284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067284">(Jun 16 2020 at 20:06)</a>:</h4>
<p>(finally)</p>



<a name="201067335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067335">(Jun 16 2020 at 20:07)</a>:</h4>
<p>I'm pretty excited to start playing with it</p>



<a name="201067379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067379">(Jun 16 2020 at 20:07)</a>:</h4>
<p>I think <span class="user-mention" data-user-id="116009">@nikomatsakis</span> is elsewhere</p>



<a name="201067409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067409">(Jun 16 2020 at 20:07)</a>:</h4>
<p>whoops, sorry, back :)</p>



<a name="201067448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067448">(Jun 16 2020 at 20:08)</a>:</h4>
<p>I have a question about the tracing support</p>



<a name="201067480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067480">(Jun 16 2020 at 20:08)</a>:</h4>
<p>Can you give a quick rundown on what does tracing enable?</p>



<a name="201067481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067481">(Jun 16 2020 at 20:08)</a>:</h4>
<p>does it still do "indenting"?</p>



<a name="201067511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067511">(Jun 16 2020 at 20:08)</a>:</h4>
<p>Hmm</p>



<a name="201067520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067520">(Jun 16 2020 at 20:08)</a>:</h4>
<p>I think that's dependent on the formatting</p>



<a name="201067557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067557">(Jun 16 2020 at 20:09)</a>:</h4>
<p><span class="user-mention" data-user-id="230601">@Nathan Whitaker</span> ^</p>



<a name="201067583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067583">(Jun 16 2020 at 20:09)</a>:</h4>
<p>that seems pretty important</p>



<a name="201067614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067614">(Jun 16 2020 at 20:09)</a>:</h4>
<p>It doesn't do indenting as it is, but we can write a custom formatter if we want that</p>



<a name="201067616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067616">(Jun 16 2020 at 20:09)</a>:</h4>
<p>I think we need to use <a href="https://github.com/davidbarsky/tracing-tree">https://github.com/davidbarsky/tracing-tree</a></p>



<a name="201067687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067687">(Jun 16 2020 at 20:10)</a>:</h4>
<p>I think we definitely want that, yeah</p>



<a name="201067709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067709">(Jun 16 2020 at 20:10)</a>:</h4>
<p>I saw there were some documentation edits</p>



<a name="201067715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067715">(Jun 16 2020 at 20:10)</a>:</h4>
<p>we should be sure to document the most convenient flow</p>



<a name="201067730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067730">(Jun 16 2020 at 20:10)</a>:</h4>
<p>(for getting indenting etc)</p>



<a name="201067754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067754">(Jun 16 2020 at 20:11)</a>:</h4>
<p><span class="user-mention" data-user-id="230601">@Nathan Whitaker</span> think you can a followup PR to add <code>tracing-tree</code>?</p>



<a name="201067760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067760">(Jun 16 2020 at 20:11)</a>:</h4>
<p>I at least make heavy use of the (old) "CHALK_DEBUG=1" functionality, to just get an "overview" of what the solver is doing at each step etc</p>



<a name="201067772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067772">(Jun 16 2020 at 20:11)</a>:</h4>
<p>Wouldn't some kind of indenting be the default?</p>



<a name="201067779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067779">(Jun 16 2020 at 20:11)</a>:</h4>
<p>(I know we still have the info level)</p>



<a name="201067780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067780">(Jun 16 2020 at 20:11)</a>:</h4>
<p>(if tracing is enabled)</p>



<a name="201067781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067781">(Jun 16 2020 at 20:11)</a>:</h4>
<p>yes</p>



<a name="201067835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067835">(Jun 16 2020 at 20:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020/near/201067754">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="230601">Nathan Whitaker</span> think you can a followup PR to add <code>tracing-tree</code>?</p>
</blockquote>
<p>Yup! Shouldn't be too difficult I think</p>



<a name="201067844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067844">(Jun 16 2020 at 20:12)</a>:</h4>
<p>it should be a one-line change</p>



<a name="201067914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067914">(Jun 16 2020 at 20:12)</a>:</h4>
<p>Can't get much easier than that</p>



<a name="201067921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067921">(Jun 16 2020 at 20:12)</a>:</h4>
<p>But <code>CHALK_DEBUG</code> should still work when running tests</p>



<a name="201067958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067958">(Jun 16 2020 at 20:12)</a>:</h4>
<p>for rustc, I'll have to add support</p>



<a name="201067969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zahari Dichev <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067969">(Jun 16 2020 at 20:13)</a>:</h4>
<p>I think tracing will require some getting used to and adjusting the workflow but ultimatelly it can provide a lot more flexibility. Things like <a href="https://github.com/yaahc/color-spantrace">https://github.com/yaahc/color-spantrace</a> can be quite neat</p>



<a name="201067990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201067990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zahari Dichev <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201067990">(Jun 16 2020 at 20:13)</a>:</h4>
<p>and for the record I do like the CHALK_DEBUG=1 as well</p>



<a name="201068006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068006">(Jun 16 2020 at 20:13)</a>:</h4>
<p>yeah I mean the old output was pretty terrible</p>



<a name="201068031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068031">(Jun 16 2020 at 20:13)</a>:</h4>
<p>it'd be great at some point to have some way to more easily (e.g.) collapse trees and walk through the results, idk</p>



<a name="201068032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068032">(Jun 16 2020 at 20:13)</a>:</h4>
<p>I think just making the jump was/is the right decision</p>



<a name="201068090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068090">(Jun 16 2020 at 20:14)</a>:</h4>
<p>(e.g., perhaps with a html rendering)</p>



<a name="201068109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068109">(Jun 16 2020 at 20:14)</a>:</h4>
<p>and it seems clear that hooking into an existing ecosystem is going to get us much further in that direction</p>



<a name="201068159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068159">(Jun 16 2020 at 20:14)</a>:</h4>
<p>Oh, it would be super interesting to generate something like a flamegraph from the tracing data</p>



<a name="201068186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068186">(Jun 16 2020 at 20:15)</a>:</h4>
<p>ah yeah that'd be a great visualization</p>



<a name="201068196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068196">(Jun 16 2020 at 20:15)</a>:</h4>
<p>something like that anyway...</p>



<a name="201068211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068211">(Jun 16 2020 at 20:15)</a>:</h4>
<p>Anyways</p>



<a name="201068224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068224">(Jun 16 2020 at 20:15)</a>:</h4>
<p>Do we want to discuss <a href="https://github.com/rust-lang/chalk/pull/526">https://github.com/rust-lang/chalk/pull/526</a> a bit?</p>



<a name="201068266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068266">(Jun 16 2020 at 20:15)</a>:</h4>
<p>Specifically, I'm not sure if I quite understand what we might need negative cycle support for</p>



<a name="201068328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068328">(Jun 16 2020 at 20:16)</a>:</h4>
<p>(I quickly looked at the comment <span class="user-mention" data-user-id="116009">@nikomatsakis</span> linked but didn't fully grok it)</p>



<a name="201068343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068343">(Jun 16 2020 at 20:16)</a>:</h4>
<p>Yeah we can talk about it</p>



<a name="201068344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068344">(Jun 16 2020 at 20:16)</a>:</h4>
<p>Agreed, it seems like there a handful of good reasons to <em>not</em> support them, but is there a solid reason why we <em>should</em>?</p>



<a name="201068419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zahari Dichev <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068419">(Jun 16 2020 at 20:17)</a>:</h4>
<p>it would also be nice to explain the connection between negative cycles support and salsa integration</p>



<a name="201068425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068425">(Jun 16 2020 at 20:17)</a>:</h4>
<p>Is specialization the only place where negative cycles might occur, or are the other posibilities?</p>



<a name="201068439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068439">(Jun 16 2020 at 20:17)</a>:</h4>
<p>OK, let's back up a little</p>



<a name="201068481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068481">(Jun 16 2020 at 20:17)</a>:</h4>
<p>So -- chalk supports <code>not { G }</code> goals in its internal structure, but obviously Rust doesn't directly offer users a way to write that sort of thing, and if we did there are different things that it might mean.</p>



<a name="201068555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068555">(Jun 16 2020 at 20:18)</a>:</h4>
<p>Actually even with chalk there are some interesting questions about what one might want it to mean...</p>



<a name="201068644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068644">(Jun 16 2020 at 20:19)</a>:</h4>
<p>...but we can ignore those for the moment. The primary problem is that if you have <code>not { G }</code> goals, you introduce the possibility of negative cycles, and they add a host of complications (although not nearly as many for the recursive solver, at least until we start talking about salsa, which we'll get to)</p>



<a name="201068701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068701">(Jun 16 2020 at 20:19)</a>:</h4>
<p>but rustc does use a limited amount of negative reasoning today</p>



<a name="201068706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068706">(Jun 16 2020 at 20:19)</a>:</h4>
<p>particularly in coherence</p>



<a name="201068789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068789">(Jun 16 2020 at 20:20)</a>:</h4>
<p>if you have two potentially overlapping impls:</p>
<div class="codehilite"><pre><span></span><code><span class="k">impl</span><span class="w"> </span><span class="n">SomeTrait</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">U</span>: <span class="nc">AnotherTrait</span><span class="o">&gt;</span><span class="w"> </span><span class="n">SomeTrait</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">U</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="201068829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068829">(Jun 16 2020 at 20:20)</a>:</h4>
<p>that is allowed if, essentially, <code>not { Vec&lt;T&gt;: AnotherTrait }</code></p>



<a name="201068851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068851">(Jun 16 2020 at 20:21)</a>:</h4>
<p>(subject to some caveats and limitations that I'll gloss over for now)</p>



<a name="201068911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201068911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201068911">(Jun 16 2020 at 20:21)</a>:</h4>
<p>so <span class="user-mention" data-user-id="125294">@Aaron Hill</span> that kind of answers your first question -- aside from specialization, I believe that this is the only place that negative goals appear in Rust today, and notably they can't be recursive in this location (coherence overlap checks)</p>



<a name="201069018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069018">(Jun 16 2020 at 20:22)</a>:</h4>
<p>in particular, they never appear in any program clauses that we produce, <em>except</em> for potentially specialization</p>



<a name="201069032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069032">(Jun 16 2020 at 20:22)</a>:</h4>
<p>i.e., we never say "this is true if that is not true"</p>



<a name="201069079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069079">(Jun 16 2020 at 20:22)</a>:</h4>
<p>They appear in coherence check for <code>Copy</code> impls (checking that <code>Drop</code> is not implemented)</p>



<a name="201069131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069131">(Jun 16 2020 at 20:23)</a>:</h4>
<p>OK, but that's still a top-level goal (and actually I think it's a bit "special" in some other respects too)</p>



<a name="201069169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069169">(Jun 16 2020 at 20:23)</a>:</h4>
<p>i.e., we are rather limiting about the kinds of things you can write <code>Copy</code> and <code>Drop</code> impls for (although I guess the stdlib has a bit more range)</p>



<a name="201069264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069264">(Jun 16 2020 at 20:24)</a>:</h4>
<p>so the question is, what about specialization? that's I think the place where things get a bit trickier</p>



<a name="201069346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069346">(Jun 16 2020 at 20:24)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="nb">Iterator</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">MyType</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">default</span> <span class="k">type</span><span class="w"> </span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kt">bool</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">Debug</span><span class="o">&gt;</span><span class="w"> </span><span class="nb">Iterator</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">MyType</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kt">u32</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="201069352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069352">(Jun 16 2020 at 20:25)</a>:</h4>
<p>consider an example like that one</p>



<a name="201069516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069516">(Jun 16 2020 at 20:26)</a>:</h4>
<p><em>at least during code generation</em> (not during type-checking, interestingly), we want to be able to say something like <code>&lt;MyType&lt;T&gt; as Iterator&gt;::Item</code> is <code>u32</code> is <code>T: Debug</code> is implemented, and <code>bool</code> otherwise. The otherwise part is effectively saying "it is bool if <code>not { T: Debug }</code>"</p>



<a name="201069627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069627">(Jun 16 2020 at 20:27)</a>:</h4>
<p>In other words, we sort of want a rule that works out to the equivalent of</p>
<div class="codehilite"><pre><span></span><code><span class="n">forall</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="n">ProjectionEq</span><span class="p">(</span><span class="o">&lt;</span><span class="n">MyType</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kt">bool</span><span class="p">)</span><span class="w"> </span>:<span class="o">-</span><span class="w"> </span><span class="n">not</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">Implemented</span><span class="p">(</span><span class="n">T</span>: <span class="nc">Debug</span><span class="p">)</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="201069637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069637">(Jun 16 2020 at 20:27)</a>:</h4>
<p>along with another rule like</p>



<a name="201069666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069666">(Jun 16 2020 at 20:27)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="n">forall</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="n">ProjectionEq</span><span class="p">(</span><span class="o">&lt;</span><span class="n">MyType</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&gt;</span>::<span class="n">Item</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kt">bool</span><span class="p">)</span><span class="w"> </span>:<span class="o">-</span><span class="w"> </span><span class="n">Implemented</span><span class="p">(</span><span class="n">T</span>: <span class="nc">Debug</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="201069761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069761">(Jun 16 2020 at 20:28)</a>:</h4>
<p>anyway this starts to be a problem, because maybe proving <code>Implemented(T: Debug)</code> winds up requiring us to prove something about <code>&lt;MyType&lt;T&gt; as Iterator&gt;::Item</code>?</p>



<a name="201069782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069782">(Jun 16 2020 at 20:28)</a>:</h4>
<p>then we would have a negative cycle</p>



<a name="201069834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069834">(Jun 16 2020 at 20:29)</a>:</h4>
<p><em>however</em>, there is one other caveat...</p>



<a name="201069872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069872">(Jun 16 2020 at 20:29)</a>:</h4>
<p>at least in rustc today, we construct this "specialization tree" that is showing the relationship between impls, and it is testing exactly these sorts of conditions (much like coherence does)</p>



<a name="201069993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201069993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201069993">(Jun 16 2020 at 20:30)</a>:</h4>
<p>and we wind up giving a kind of cycle error if figuring out the specialization relationship between two iterator impls</p>



<a name="201070041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070041">(Jun 16 2020 at 20:30)</a>:</h4>
<p>winds up requiring that same tree to be constructed</p>



<a name="201070094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070094">(Jun 16 2020 at 20:31)</a>:</h4>
<p>anyway I have to go review <em>exactly</em> how the code works here, I haven't looked at it in a while, and anyway things are unstable, but basically I'm wondering if maybe we can prevent a negative cycle through other means</p>



<a name="201070117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070117">(Jun 16 2020 at 20:31)</a>:</h4>
<p>and indeed maybe we kind of <em>have</em> to..?</p>



<a name="201070165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070165">(Jun 16 2020 at 20:31)</a>:</h4>
<p>that would be kind of nice</p>



<a name="201070222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070222">(Jun 16 2020 at 20:32)</a>:</h4>
<p>because negative cycles are sort of a pain, and I guess I can cover a bit about the salsa complications I was alluding to, but let me stop here first to ask if this all made sense so far?</p>



<a name="201070232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070232">(Jun 16 2020 at 20:32)</a>:</h4>
<p>So, I'm looking at the example you gave here: <a href="https://github.com/rust-lang/chalk/issues/219#issuecomment-564721443">https://github.com/rust-lang/chalk/issues/219#issuecomment-564721443</a></p>



<a name="201070253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070253">(Jun 16 2020 at 20:32)</a>:</h4>
<p>I can't see how that <em>should</em> compile</p>



<a name="201070273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070273">(Jun 16 2020 at 20:32)</a>:</h4>
<p>(PS this is one of the reasons that I would not support adding <code>T: !Trait</code> to user-syntax unless we gave it a very particular meaning that is not, in fact, much like <code>not { G }</code> at all)</p>



<a name="201070309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070309">(Jun 16 2020 at 20:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020/near/201070253">said</a>:</p>
<blockquote>
<p>I can't see how that <em>should</em> compile</p>
</blockquote>
<p>yeah indeed</p>



<a name="201070358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070358">(Jun 16 2020 at 20:33)</a>:</h4>
<p>I guess one question is whether I can construct a more "sensical" example</p>



<a name="201070382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070382">(Jun 16 2020 at 20:34)</a>:</h4>
<p>A negative cycle very much seems like a regular cycle right now in that they aren't provable</p>



<a name="201070427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070427">(Jun 16 2020 at 20:34)</a>:</h4>
<p>but...</p>



<a name="201070428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070428">(Jun 16 2020 at 20:34)</a>:</h4>
<p>eh</p>



<a name="201070442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070442">(Jun 16 2020 at 20:34)</a>:</h4>
<p>It gets back to <code>not</code></p>



<a name="201070445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070445">(Jun 16 2020 at 20:34)</a>:</h4>
<p>in what way is a regular cycle not provable?</p>



<a name="201070489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070489">(Jun 16 2020 at 20:34)</a>:</h4>
<p>well, unless it's coinductive</p>



<a name="201070506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070506">(Jun 16 2020 at 20:34)</a>:</h4>
<p>well you can still make it work</p>



<a name="201070527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070527">(Jun 16 2020 at 20:34)</a>:</h4>
<p>but it's tricky because it does tend to produce an infinite stream of answers unless you construct things very carefully</p>



<a name="201070577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070577">(Jun 16 2020 at 20:35)</a>:</h4>
<p>e.g. <a href="http://rust-lang.github.io/chalk/book/recursive/inductive_cycles.html#inductive-cycles-when-do-we-ever-terminate">this example has a unique answer though</a></p>



<a name="201070605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070605">(Jun 16 2020 at 20:35)</a>:</h4>
<p>maybe kind of artificial</p>



<a name="201070618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070618">(Jun 16 2020 at 20:36)</a>:</h4>
<p>well, not maybe :)</p>



<a name="201070699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070699">(Jun 16 2020 at 20:36)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">C</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">C</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">D</span><span class="o">&gt;</span><span class="w"> </span><span class="n">C</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="w"> </span><span class="n">C</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="kt">u32</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">trait</span><span class="w"> </span><span class="n">D</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>with the goal of <code>Implemented(?X: C)</code></p>



<a name="201070763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070763">(Jun 16 2020 at 20:37)</a>:</h4>
<p>well that's not a very good illustration</p>



<a name="201070796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070796">(Jun 16 2020 at 20:37)</a>:</h4>
<p>mhm</p>



<a name="201070803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070803">(Jun 16 2020 at 20:37)</a>:</h4>
<p>but anyway your point is true that, apart from coinduction, we can't have a cycle if we know all the types involved, but the main thing I wanted to say is that sometimes we get cycles because of inference variables, and it's possible (esp. in the SLG solver) to build one answer atop another</p>



<a name="201070901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070901">(Jun 16 2020 at 20:38)</a>:</h4>
<p>e.g.</p>
<div class="codehilite"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">A</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">A</span><span class="o">&gt;</span><span class="w"> </span><span class="n">A</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="w"> </span><span class="n">A</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="kt">u32</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>with the goal <code>?X: A</code> has infinite answers</p>



<a name="201070918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070918">(Jun 16 2020 at 20:38)</a>:</h4>
<p><code>u32</code>, <code>Vec&lt;u32&gt;</code>, <code>Vec&lt;Vec&lt;u32&gt;&gt;</code> etc...</p>



<a name="201070920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070920">(Jun 16 2020 at 20:38)</a>:</h4>
<p>anyway</p>



<a name="201070963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070963">(Jun 16 2020 at 20:39)</a>:</h4>
<p>Right so, where does that leave us</p>



<a name="201070972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070972">(Jun 16 2020 at 20:39)</a>:</h4>
<p>side question - when do we generate goals like <code>Implemented(?X: Trait)</code> in rustc?</p>



<a name="201070984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070984">(Jun 16 2020 at 20:39)</a>:</h4>
<p>heh all the time</p>



<a name="201070996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201070996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201070996">(Jun 16 2020 at 20:39)</a>:</h4>
<p>however, we never try to prove them, because we consider it too ambiguous--</p>



<a name="201071008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071008">(Jun 16 2020 at 20:39)</a>:</h4>
<p>we just wait until <code>?X</code> gets constrained by some other means <em>but</em></p>



<a name="201071060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071060">(Jun 16 2020 at 20:40)</a>:</h4>
<p>you can make very similar examples by making the top-level goal be <code>Vec&lt;?X&gt;: Trait</code> and things like that</p>



<a name="201071076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071076">(Jun 16 2020 at 20:40)</a>:</h4>
<p>an example of where we would create such a goal is</p>



<a name="201071095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071095">(Jun 16 2020 at 20:40)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">Debug</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">T</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">foo</span><span class="p">();</span><span class="w"> </span><span class="c1">// type of `x` is `?T`, and we know that `Implemented(?T: Debug)` must hold</span>
</code></pre></div>



<a name="201071118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071118">(Jun 16 2020 at 20:40)</a>:</h4>
<p>or perhaps just <code>Default::default()</code>, which would yield a value of type <code>?X</code> and create the goal <code>?X: Default</code></p>



<a name="201071180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071180">(Jun 16 2020 at 20:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020/near/201070963">said</a>:</p>
<blockquote>
<p>Right so, where does that leave us</p>
</blockquote>
<p>well, I could talk a bit about the salsa stuff</p>



<a name="201071195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071195">(Jun 16 2020 at 20:41)</a>:</h4>
<p>yeah, I guess that's the other side of the coin</p>



<a name="201071219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071219">(Jun 16 2020 at 20:41)</a>:</h4>
<p>I guess though that it leaves us more or less saying "it'd be nice to figure out if we really need negative cycles", and I'm not sure, but the answer has everything to do w/ specialization in the end</p>



<a name="201071271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071271">(Jun 16 2020 at 20:42)</a>:</h4>
<p>talking about the salsa stuff is valuable regardless, because I think it's useful for us to talk about caching and chalk</p>



<a name="201071303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071303">(Jun 16 2020 at 20:42)</a>:</h4>
<p>(and incremental compilation)</p>



<a name="201071340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071340">(Jun 16 2020 at 20:43)</a>:</h4>
<p>about how having 2 query systems in the compiler could go wrong?</p>



<a name="201071342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071342">(Jun 16 2020 at 20:43)</a>:</h4>
<p>I'm not sure how familiar people are with the model for incremental compilation that rustc/rust-analyzer are using; I'm going to assume at least somewhat. Basically memoized functions and we track the inputs it used and try to figure out if they are dirty.</p>



<a name="201071374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071374">(Jun 16 2020 at 20:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116118">@Matthew Jasper</span> chalk doesn't direectly use salsa, and it's meant to be embedded into either rustc or rust-analyzer, but I'm using salsa as a shorthand here</p>



<a name="201071434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071434">(Jun 16 2020 at 20:44)</a>:</h4>
<p>rustc would of course have be extended with similar capabilities</p>



<a name="201071461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071461">(Jun 16 2020 at 20:44)</a>:</h4>
<p>(in any case I do hope that we can port rustc and rust-analyzer to some common system at some point)</p>



<a name="201071475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071475">(Jun 16 2020 at 20:44)</a>:</h4>
<p>(although I could believe that this actually doesn't make sense because they have different requirements)</p>



<a name="201071539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071539">(Jun 16 2020 at 20:45)</a>:</h4>
<p>anyway the high-level thing I would like to have is that you can execute a query like "solve this goal" and we can cache it incrementally, such that if the user adds some new impls, we might not have to re-execute that query</p>



<a name="201071576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071576">(Jun 16 2020 at 20:45)</a>:</h4>
<p>depending on whether they would've been relevant</p>



<a name="201071669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071669">(Jun 16 2020 at 20:46)</a>:</h4>
<p>the recursive solver actually offered what seemed like an intriguing integration opportunity there</p>



<a name="201071684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071684">(Jun 16 2020 at 20:46)</a>:</h4>
<p>That would require having clear inputs for the queries, which I'm not sure is the case</p>



<a name="201071691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071691">(Jun 16 2020 at 20:46)</a>:</h4>
<p>it is</p>



<a name="201071700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071700">(Jun 16 2020 at 20:46)</a>:</h4>
<p>that's what the <code>RustIrDatabase</code> is</p>



<a name="201071724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071724">(Jun 16 2020 at 20:46)</a>:</h4>
<p>basically the high-level idea is</p>



<a name="201071776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071776">(Jun 16 2020 at 20:47)</a>:</h4>
<p>as the query executes, it needs to construct program clauses, and to do that, it invokes calls to <code>RustIrDatabase</code>, asking for details about a given trait or impl</p>



<a name="201071801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071801">(Jun 16 2020 at 20:47)</a>:</h4>
<p>(we can be more selective about which details we ask for, we make some effort now but not much)</p>



<a name="201071817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071817">(Jun 16 2020 at 20:47)</a>:</h4>
<p>but regardless the query system is made precisely to do this sort of tracking -- it can track what we requested</p>



<a name="201071927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071927">(Jun 16 2020 at 20:48)</a>:</h4>
<p>those methods in the <code>RustIrDatabase</code> would be (in turn) salsa queries, so we know <em>their</em> inputs, and hence we can determine if they are dirty</p>



<a name="201071938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071938">(Jun 16 2020 at 20:48)</a>:</h4>
<p>or, in the limit, we can re-execute them and see if they give the same result (without having to do all the other work)</p>



<a name="201071991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071991">(Jun 16 2020 at 20:48)</a>:</h4>
<p>(make sense?)</p>



<a name="201071992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201071992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201071992">(Jun 16 2020 at 20:48)</a>:</h4>
<p>Okay, so how do negative cycles play into this</p>



<a name="201072009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072009">(Jun 16 2020 at 20:48)</a>:</h4>
<p>yeah so the first tricky part is any cycles at all</p>



<a name="201072066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072066">(Jun 16 2020 at 20:49)</a>:</h4>
<p>in some sense the "best" integration would be if the recursive solver, whihc internally has as its 'main operation' a "solve-goal" method</p>



<a name="201072077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072077">(Jun 16 2020 at 20:49)</a>:</h4>
<p>if that method were indeed just a salsa query</p>



<a name="201072096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072096">(Jun 16 2020 at 20:49)</a>:</h4>
<p>basically part of the <code>RustIrDatabase</code> trait, if you will</p>



<a name="201072116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072116">(Jun 16 2020 at 20:49)</a>:</h4>
<p>it would call back to a helper function like <code>solve_goal_impl</code> implemented in chalk somewhere</p>



<a name="201072163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072163">(Jun 16 2020 at 20:50)</a>:</h4>
<p>and we would be piggy-backing on salsa to do the caching</p>



<a name="201072194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072194">(Jun 16 2020 at 20:50)</a>:</h4>
<p>this is the design I was shooting for and I think it can largely work</p>



<a name="201072208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072208">(Jun 16 2020 at 20:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020/near/201068159">said</a>:</p>
<blockquote>
<p>Oh, it would be super interesting to generate something like a flamegraph from the tracing data</p>
</blockquote>
<p>sorry to butt in, but that's already a thing: <a href="https://tracing.rs/tracing_flame/">https://tracing.rs/tracing_flame/</a> thanks to <span class="user-mention" data-user-id="220273">@Jane Lusby</span>.</p>
<p>(lemme know if you run into issues with <code>tracing-tree</code>.)</p>



<a name="201072256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072256">(Jun 16 2020 at 20:50)</a>:</h4>
<p><a href="https://hackmd.io/FCrUiW27TnKw3MTvRtfPjQ">I wrote some notes about it here</a></p>



<a name="201072276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072276">(Jun 16 2020 at 20:51)</a>:</h4>
<p>anyway if there were no cycles this would actually work pretty trivially</p>



<a name="201072319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072319">(Jun 16 2020 at 20:51)</a>:</h4>
<p>but yeah there are cycles and sometimes we have to deal with that, without reporting an error</p>



<a name="201072335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072335">(Jun 16 2020 at 20:51)</a>:</h4>
<p>so the idea was to extend salsa to have a notion of a "monotonic" query</p>



<a name="201072454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072454">(Jun 16 2020 at 20:52)</a>:</h4>
<p>such that if <code>solve_goal(K)</code> winds up invoking itself through some series of <code>solve_goal</code> calls, we basically do the same thing the recursive solver does, but we move that to salsa -- that is, we return an intermediate result and flag it as a cycle. Then we re-execute iteratively until we reach a fixed point.</p>



<a name="201072483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072483">(Jun 16 2020 at 20:53)</a>:</h4>
<p>The job of the <em>chalk</em> there is not to do the iteration, but to define the function for "one iteration of the loop", and the "merging" function that helps salsa know when fixed point has been reached done</p>



<a name="201072570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072570">(Jun 16 2020 at 20:54)</a>:</h4>
<p>I think this is a kind of clean formulation because the idea of a "monotonic thing that runs until a fixed point is reached" is more general than just chalk, though I'm not sure what else you would use it for right now...</p>



<a name="201072679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072679">(Jun 16 2020 at 20:54)</a>:</h4>
<p>...the challenge with <em>negative cycles</em> is that they kind of break this logic and add a bunch more considerations.</p>



<a name="201072702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072702">(Jun 16 2020 at 20:55)</a>:</h4>
<p>(oh, chalk would also have to define the initial value)</p>



<a name="201072777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072777">(Jun 16 2020 at 20:55)</a>:</h4>
<p>anyway it's not that I <em>can't</em> imagine modeling this in salsa, it's just that it seems a lot more tailored to chalk.</p>



<a name="201072782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072782">(Jun 16 2020 at 20:55)</a>:</h4>
<p>which I guess is "ok"</p>



<a name="201072828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072828">(Jun 16 2020 at 20:56)</a>:</h4>
<p>but less appealing to me</p>



<a name="201072870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072870">(Jun 16 2020 at 20:56)</a>:</h4>
<p>It sounds...similar to the problem of "delayed subgoals" in the slg solver</p>



<a name="201072882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072882">(Jun 16 2020 at 20:56)</a>:</h4>
<p>Is that initial value for the case where it reaches the fixed point in the first iteration?</p>



<a name="201072894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072894">(Jun 16 2020 at 20:56)</a>:</h4>
<p>I realize now that I should try to sketch out this integration idea in a bit more detail, it seems really quite elegant to me, and it's one of the main reasons I've been so interested in the recursive solver and less so in the SLG solver (because integrating the SLG solver feels a lot more complex)</p>



<a name="201072901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072901">(Jun 16 2020 at 20:56)</a>:</h4>
<p>unless I'm just completely misunderstanding</p>



<a name="201072905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072905">(Jun 16 2020 at 20:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020/near/201072870">said</a>:</p>
<blockquote>
<p>It sounds...similar to the problem of "delayed subgoals" in the slg solver</p>
</blockquote>
<p>yeah they are very realted</p>



<a name="201072918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072918">(Jun 16 2020 at 20:57)</a>:</h4>
<p>I mean</p>



<a name="201072925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072925">(Jun 16 2020 at 20:57)</a>:</h4>
<p>delayed subgoals were introduced to handle negative cycles :)</p>



<a name="201072952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072952">(Jun 16 2020 at 20:57)</a>:</h4>
<p>mmm no</p>



<a name="201072956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072956">(Jun 16 2020 at 20:57)</a>:</h4>
<p>then we sort of adapted them to handle coinduction</p>



<a name="201072961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072961">(Jun 16 2020 at 20:57)</a>:</h4>
<p>delayed subgoals were introduced for coinduction</p>



<a name="201072978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072978">(Jun 16 2020 at 20:57)</a>:</h4>
<p>delayed "literals" on the other hand...</p>



<a name="201072979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072979">(Jun 16 2020 at 20:57)</a>:</h4>
<p>hehe</p>



<a name="201072989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201072989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201072989">(Jun 16 2020 at 20:57)</a>:</h4>
<p>yeah, ok</p>



<a name="201073103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073103">(Jun 16 2020 at 20:58)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125131">detrumi</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020/near/201072882">said</a>:</p>
<blockquote>
<p>Is that initial value for the case where it reaches the fixed point in the first iteration?</p>
</blockquote>
<p>no, it's the value that you get when a cycle arises</p>



<a name="201073119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073119">(Jun 16 2020 at 20:58)</a>:</h4>
<p>the first time, anyway</p>



<a name="201073166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073166">(Jun 16 2020 at 20:58)</a>:</h4>
<p>it's normally "error", but for coinductive goals, it should be "success", I wrote some about that in <a href="https://github.com/rust-lang-nursery/chalk/issues/399">chalk#399</a></p>



<a name="201073225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073225">(Jun 16 2020 at 20:59)</a>:</h4>
<p>which reminds me that <span class="user-mention" data-user-id="129457">@Florian Diebold</span> raised an important concern there that we could've also talked about, which has been a bit on my mind, but we're out of time I guess :)</p>



<a name="201073277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073277">(Jun 16 2020 at 20:59)</a>:</h4>
<p>(in particular, the priority mechanism we use to resolve <code>T::Item</code> does kind of mean that things aren't necessarily as monotonic as they are conceptually)</p>



<a name="201073363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073363">(Jun 16 2020 at 21:00)</a>:</h4>
<p>Yeah, I feel this is somewhat the same problem we have in SLG</p>



<a name="201073401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073401">(Jun 16 2020 at 21:00)</a>:</h4>
<p>(though I want to spend some time trying to craft problematic examples, and I have some hopes that we can overcome that without the mechanism we're currently using to guarantee termination)</p>



<a name="201073409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073409">(Jun 16 2020 at 21:00)</a>:</h4>
<p>That makes implementing a "priority" system harder</p>



<a name="201073464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073464">(Jun 16 2020 at 21:01)</a>:</h4>
<p>yeah I mean fundamentally priority is kind of ... wrong in a <em>way</em>. certainly it can't be used lightly, it has to be part of a "well-constructed system" that makes it ok to disregard the other answer</p>



<a name="201073728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%2006.16.2020/near/201073728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.2006.2E16.2E2020.html#201073728">(Jun 16 2020 at 21:03)</a>:</h4>
<p>anyway, I guess we're out of time, hopefully that was useful background :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>